<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=
     initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="login.css">
</head>
<body>
<script type="text/javascript">
    function login(a,b)
    {
        var raccount = "zjh";
        var rpassword = "123";
        var inputa = document.getElementById('t1').value
        var inputn = document.getElementById('t2').value
        //alert(inputa)
        if ((a == raccount)&&(b == rpassword))
        {
            window.location.href="index.html"
        }
        else
        {
            alert("your account or password is wrong")
        }
    }
    function register(a,b)
    {
        var a = document.getElementById("t1").value
        var b = document.getElementById('t2').value
        alert("ok")
    }
    function ga()
    {

    }
</script>
<h1>
    <div class="header" id="h1">
        login
    </div>
</h1>

<div class="box">
    <div class="name">
        <input type="text" id="t1" value="" placeholder="&nbsp;&nbsp; account" >
    </div>
    <div class="password">
        <input type="password" id="t2" placeholder="&nbsp;&nbsp; password">
    </div>
    <div class="login">
        <button id="b1" onclick="login(document.getElementById('t1').value,document.getElementById('t2').value)"><b>login</b></button>
    </div>
    <div class="register">
        <button id="b2" onclick="register(document.getElementById('t1').value,document.getElementById('t2').value)"><b>register</b></button>
    </div>
    <div class="reme">
        <a href="#" id="fp"><b>forget password</b></a>
    </div>
</div>
</body>
</html>